package org.jeecg.modules.basic.demo.apartment.entity;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.criteria.CriteriaBuilder;

/**
 * @Description: 学校公寓信息
 * @Author: jeecg-boot
 * @Date:   2020-12-28
 * @Version: V1.0
 */
@Data
@TableName("lwgy_base_apartment")
@ApiModel(value="lwgy_base_apartment对象", description="学校公寓信息")
public class LwgyBaseApartment implements Serializable,Comparable<LwgyBaseApartment> {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键")
	private String id;
	/**创建人*/
	@ApiModelProperty(value = "创建人")
	private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "创建日期")
	private Date createTime;
	/**更新人*/
	@ApiModelProperty(value = "更新人")
	private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "更新日期")
	private Date updateTime;
	/**所属部门*/
	@ApiModelProperty(value = "所属部门")
	private String sysOrgCode;
	/**名称*/
	@Excel(name = "名称", width = 15)
	@ApiModelProperty(value = "名称")
	private String name;
	/**编码*/
	@Excel(name = "编码", width = 15)
	@ApiModelProperty(value = "编码")
	private String code;
	/**父级节点*/
	@Excel(name = "父级节点", width = 15)
	@ApiModelProperty(value = "父级节点")
	private String pid;
	/**是否有子节点*/
	@Excel(name = "是否有子节点", width = 15, dicCode = "yn")
	@Dict(dicCode = "yn")
	@ApiModelProperty(value = "是否有子节点")
		private String hasChild;
	/**类型*/
	@Excel(name = "类型", width = 15, dicCode = "apartment_type")
	@Dict(dicCode = "apartment_type")
	@ApiModelProperty(value = "类型")
	private String type;
	/**级次*/
	@Excel(name = "级次", width = 15)
	@ApiModelProperty(value = "级次")
	private Integer level;
	/**内码*/
	@Excel(name = "内码", width = 15)
	@ApiModelProperty(value = "内码")
	private String innerCode;
	/**管理员*/
	@Excel(name = "管理员", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
	@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
	@ApiModelProperty(value = "管理员")
	private String admin;
	/**房间朝向*/
	@Excel(name = "房间朝向", width = 15, dicCode = "room_orientation")
	@Dict(dicCode = "room_orientation")
	private String roomOrientation;
	/**房间性别*/
	@Excel(name = "房间性别", width = 15, dicCode = "sex")
	@Dict(dicCode = "sex")
	@ApiModelProperty(value = "房间性别")
	private String roomSex;
	/**房间性别*/
	@Excel(name = "房间类型", width = 15, dicCode = "room_type")
	@Dict(dicCode = "room_type")
	@ApiModelProperty(value = "房间类型")
	private String roomType;

	@Excel(name = "房间人数", width = 15)
	@ApiModelProperty(value = "房间人数")
	private Integer bedsNum;

	@Excel(name = "房间排序号", width = 15)
	@ApiModelProperty(value = "房间排序号")
	private String roomCoordinates;


	@TableField(exist = false)
	private boolean existFlag;

	@TableField(exist = false)
	@Excel(name = "校区", width = 15,dicCode = "student_campus")
	@ApiModelProperty(value = "校区")
	private String studentCampus;

	@TableField(exist = false)
	@Excel(name = "学院", width = 15,dicCode = "student_college")
	@ApiModelProperty(value = "学院")
	private String studentCollege;

	@TableField(exist = false)
	@Excel(name = "专业", width = 15,dicCode = "student_major")
	@ApiModelProperty(value = "专业")
	private String studentMajor;

	@TableField(exist = false)
	@Excel(name = "年级", width = 15,dicCode = "student_year")
	@ApiModelProperty(value = "年级")
	private String studentYear;

	@TableField(exist = false)
	@Excel(name = "班级", width = 15,dicCode = "student_class")
	@ApiModelProperty(value = "班级")
	private String studentClass;

	@TableField(exist = false)
	@Excel(name = "学历", width = 15,dicCode = "student_education")
	@ApiModelProperty(value = "学历")
	private String studentEducation;

	@TableField(exist = false)
	@Excel(name = "学制", width = 15,dicCode = "student_school_system")
	@ApiModelProperty(value = "学制")
	private String studentSchoolSystem;

	/**离校时间*/
	@TableField(exist = false)
	@Excel(name = "离校时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "离校时间")
	private Date studentLeaveschool;

	/**开始时间*/
	@TableField(exist = false)
	@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "开始时间")
	private Date studentLeaveschool_begin;

	/**结束时间*/
	@TableField(exist = false)
	@Excel(name = "结束时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "结束时间")
	private Date studentLeaveschool_end;

	@TableField(exist = false)
	@Excel(name = "床位价格",width = 15)
	@Dict(dicCode = "id",dicText = "bed_price",dictTable = "lwgy_basic_beed")
	@ApiModelProperty(value = "床位价格")
	private String bedPrice;

	@TableField(exist = false)
	private String isAdminId;
	@TableField(exist = false)
	private String isBed;
	@TableField(exist = false)
	private String realname;
	@TableField(exist = false)
	private String studentName;
	@TableField(exist = false)
	private String studentNumber;

	private String delFlag;
	@Override
	public int compareTo(LwgyBaseApartment o) {
		int i = Integer.parseInt(this.innerCode)- Integer.parseInt(o.getInnerCode());
		return i;
	}
}
